<?php 
/* 
* This file is part of TCDB. 
* 
* Copyright (C) 2000-2009 
* Technology Consultant Corps 
* Grinnell College 
* Grinnell, IA, 50112 
* tc@grinnell.edu 
* 
* TCDB is free software; you can redistribute it and/or modify 
* it under the terms of the GNU General Public License as published by 
* the Free Software Foundation; either version 3 of the License, or 
* (at your option) any later version. 
* 
* TCDB is distributed in the hope that it will be useful, 
* but WITHOUT ANY WARRANTY; without even the implied warranty of 
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
* GNU General Public License for more details. 
* 
* You should have received a copy of the GNU General Public License 
* along with TCDB. If not, see <http://www.gnu.org/licenses/>. 
* 

============================================================================= 

* functions.php -- "Repository" for commonly-used functions 
* 
* Author: Dylan J. Sather
* Created: 2009-06-04 
* Last edited: 2009-07-06 
*/ 

/* replaceQuotes -- replaces single and double quotes with
                    their code equivalents
 @param $strToAlter - input string
 @return altered string
*/

function replaceQuotes($strToAlter) {
    return str_replace("\"", "&#34;", str_replace("\'", "&#39;", $strToAlter));
}

/* printServerTime -- prints the current time of the server
 @param -- none
 @return nothing -- prints current time
*/

function printServerTime() {
    date_default_timezone_set('America/Chicago');
    echo "\n  <div id='time_footer'><p>Server Time: " . 
	  date('H') . ":" . 
	  date('i') . ":" .
	  date('s') . "</p></div>\n";
}

?>
